/*
 * Copyright (C) 2011 CrystalRange
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.crystalrange.documents.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.crystalrange.model.User;

/**
 * The Class Document.
 *
 * @author Krzysiek
 * @guru Tomek
 */
public class Document {
    
    /** The id. */
    private Long id;
    
    /** The title. */
    private String title;
    
    /** The subtitle. */
    private String subtitle;
    
    /** The description. */
    private String description;
    
    /** The copyright. */
    private String copyright;
    
    /** The created date. */
    private Date createdDate;
    
    /** The created by. */
    private User createdBy;
    
    /** The document type. */
    private DocumentType documentType;
    
    /** The document category. */
    private DocumentCategory documentCategory;
    
    /** The document groups. */
    private List<DocumentGroup> documentGroups;
    
    /** The document tags. */
    private List<DocumentTag> documentTags;
    
    /** The parent document references. */
    private List<DocumentReference> parentDocumentReferences;
    
    /** The child document references. */
    private List<DocumentReference> childDocumentReferences;
    
    /** The document versions. */
    private List<DocumentVersion> documentVersions;
    
    private List<DocumentLockedHistory> documentLockedHistorys;
    
    private User lockedBy;
    
    /**
     * Instantiates a new document.
     */
    public Document() {
        this.documentGroups = new ArrayList<DocumentGroup>();
        this.documentTags = new ArrayList<DocumentTag>();
        this.childDocumentReferences = new ArrayList<DocumentReference>();
        this.parentDocumentReferences = new ArrayList<DocumentReference>();
        this.documentVersions = new ArrayList<DocumentVersion>();
        this.documentLockedHistorys = new ArrayList<DocumentLockedHistory>();
    }
    
    /**
     * Gets the copyright.
     *
     * @return the copyright
     */
    public String getCopyright() {
        return copyright;
    }

    /**
     * Sets the copyright.
     *
     * @param copyright the new copyright
     */
    public void setCopyright(String copyright) {
        this.copyright = copyright;
    }

    /**
     * Gets the created by.
     *
     * @return the created by
     */
    public User getCreatedBy() {
        return createdBy;
    }

    /**
     * Sets the created by.
     *
     * @param createdBy the new created by
     */
    public void setCreatedBy(User createdBy) {
        this.createdBy = createdBy;
    }

    /**
     * Gets the created date.
     *
     * @return the created date
     */
    public Date getCreatedDate() {
        return createdDate;
    }

    /**
     * Sets the created date.
     *
     * @param createdDate the new created date
     */
    public void setCreatedDate(Date createdDate) {
        this.createdDate = createdDate;
    }

    /**
     * Gets the description.
     *
     * @return the description
     */
    public String getDescription() {
        return description;
    }

    /**
     * Sets the description.
     *
     * @param description the new description
     */
    public void setDescription(String description) {
        this.description = description;
    }

    /**
     * Gets the id.
     *
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * Sets the id.
     *
     * @param id the new id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * Gets the subtitle.
     *
     * @return the subtitle
     */
    public String getSubtitle() {
        return subtitle;
    }

    /**
     * Sets the subtitle.
     *
     * @param subtitle the new subtitle
     */
    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    /**
     * Gets the title.
     *
     * @return the title
     */
    public String getTitle() {
        return title;
    }

    /**
     * Sets the title.
     *
     * @param title the new title
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * Gets the document category.
     *
     * @return the document category
     */
    public DocumentCategory getDocumentCategory() {
        return documentCategory;
    }

    /**
     * Sets the document category.
     *
     * @param documentCategory the new document category
     */
    public void setDocumentCategory(DocumentCategory documentCategory) {
        this.documentCategory = documentCategory;
    }

    /**
     * Gets the document type.
     *
     * @return the document type
     */
    public DocumentType getDocumentType() {
        return documentType;
    }

    /**
     * Sets the document type.
     *
     * @param documentType the new document type
     */
    public void setDocumentType(DocumentType documentType) {
        this.documentType = documentType;
    }

    /**
     * Gets the document groups.
     *
     * @return the document groups
     */
    public List<DocumentGroup> getDocumentGroups() {
        return documentGroups;
    }

    /**
     * Sets the document groups.
     *
     * @param documentGroups the new document groups
     */
    public void setDocumentGroups(List<DocumentGroup> documentGroups) {
        this.documentGroups = documentGroups;
    }

    /**
     * Gets the document tags.
     *
     * @return the document tags
     */
    public List<DocumentTag> getDocumentTags() {
        return documentTags;
    }

    /**
     * Sets the document tags.
     *
     * @param documentTags the new document tags
     */
    public void setDocumentTags(List<DocumentTag> documentTags) {
        this.documentTags = documentTags;
    }

    /**
     * Gets the child document references.
     *
     * @return the child document references
     */
    public List<DocumentReference> getChildDocumentReferences() {
        return childDocumentReferences;
    }

    /**
     * Sets the child document references.
     *
     * @param childDocumentReferences the new child document references
     */
    public void setChildDocumentReferences(List<DocumentReference> childDocumentReferences) {
        this.childDocumentReferences = childDocumentReferences;
    }

    /**
     * Gets the parent document references.
     *
     * @return the parent document references
     */
    public List<DocumentReference> getParentDocumentReferences() {
        return parentDocumentReferences;
    }

    /**
     * Sets the parent document references.
     *
     * @param parentDocumentReferences the new parent document references
     */
    public void setParentDocumentReferences(List<DocumentReference> parentDocumentReferences) {
        this.parentDocumentReferences = parentDocumentReferences;
    }

    /**
     * Gets the document versions.
     *
     * @return the document versions
     */
    public List<DocumentVersion> getDocumentVersions() {
        return documentVersions;
    }

    /**
     * Sets the document versions.
     *
     * @param documentVersions the new document versions
     */
    public void setDocumentVersions(List<DocumentVersion> documentVersions) {
        this.documentVersions = documentVersions;
    }

	public List<DocumentLockedHistory> getDocumentLockedHistorys() {
		return documentLockedHistorys;
	}

	public void setDocumentLockedHistorys(
			List<DocumentLockedHistory> documentLockedHistorys) {
		this.documentLockedHistorys = documentLockedHistorys;
	}

	public User getLockedBy() {
		return lockedBy;
	}

	public void setLockedBy(User lockedBy) {
		this.lockedBy = lockedBy;
	}

}
